package com.xique.job.task;

import com.xique.park.api.ParkStatisticsIncomeService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 收入统计报表定时任务处理类
 *
 * @author xique
 */
@Slf4j
@RequiredArgsConstructor
@Component
public class ParkStatisticsIncomeTask {

    private final ParkStatisticsIncomeService parkStatisticsIncomeService;

    /**
     * 昨日收入统计
     */
    public void yesterdayStatisticsIncome() {
        log.info("[定时任务]-开始昨日收入统计");
        long startTime = System.currentTimeMillis();
        parkStatisticsIncomeService.yesterdayStatisticsIncome();
        log.info("[定时任务]-昨日收入统计执行时间：{}", System.currentTimeMillis() - startTime);
    }

}
